4d359078baaf62bce483a5a7192d32a0939341c0,src/edu/stanford/nlp/ling/tokensregex/matcher/TrieMapMatcher.java,PartialApproxMatch,withMatch,#MatchCostFunction#number#K#K#boolean#TrieMap#,416

Before Change


          res.multimatched = new ArrayList<List<K>>(multimatched.size()+1);
          res.multimatched.addAll(multimatched);
        }
        res.multimatched.add(res.matched.subList(lastMultimatchedStartIndex, res.matched.size()));
        res.cost += costFunction.multiMatchDeltaCost(res.multimatched.get(res.multimatched.size()-1), res.value, res.multimatched.size());
        res.lastMultimatchedStartIndex = res.matched.size();
        // Reset current value/key being matched

After Change


          res.multimatches = new ArrayList<Match<K,V>>(multimatches.size()+1);
          res.multimatches.addAll(multimatches);
        }
        List<K> newlyMatched = res.matched.subList(lastMultimatchedMatchedStartIndex, res.matched.size());
        res.multimatches.add( new Match<K, V>(
                newlyMatched,
                res.value,
                lastMultimatchedOriginalStartIndex, res.end
        ));
        res.cost += costFunction.multiMatchDeltaCost(newlyMatched, res.value, res.multimatches.size());
        res.lastMultimatchedMatchedStartIndex = res.matched.size();
        res.lastMultimatchedOriginalStartIndex = res.end;